devPort = 506;
devName = "dgz_pwr_do010"

numBits = 50000;
numInputBits = 50000;
numRegs = 50000;
numInputRegs = 50000;

debugFlag = 1;

function simDev(func,addr,num)
	print("begin simDev" .. devName);
	
	local val=get_reg(addr);
	
	print(val);
	
	delaySim(5);
	
	if val==0x10 then
		set_reg(0x3d,0x80);
		set_reg(0x3e,0x0);
	end;
	
	if val==0x20 then
		set_reg(0x3d,0x0);
		set_reg(0x3e,0x100);
	end;
	
	print("end simDev" .. devName);
end

